<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改角色权限</title>
<link rel="stylesheet" type="text/css" href="<c:url value="/styles/sample.css"/>"/>
</head>
<body>
<div id="box">
        <div class="title">Apache Shiro Sample App - Edit Role-Permissions</div>
	
        <div class="content">
        
      	==========${role.name }，当前所拥有的权限是：=============
        <c:forEach var="permission" items="${role.permissions}">
        		<div style="cursor:pointer;" id="${permission.id }">${permission.id }：${permission.realm }</div>
        </c:forEach>
         
        ==========${role.name }，当前没有拥有的权限是：=============-->
        
        <c:forEach var="permission" items="${permissions}">
        		<div style="cursor:pointer;" id="${permission.id }">${permission.id }：${permission.realm }</div>
        	
        </c:forEach>
        <form action="<c:url value="/modifyRolePermissions"/>" method="post">
        	<input type="hidden" id="roleId" name="roleId" value="${role.id}">
           增加权限：<input type="text" id="addPermission" name="addPermission"></br>
           减少权限：<input type="text" id="minusPermission" name="minusPermission"/> 	 
           <input type="submit" value="提交信息"/>
		</form>
            
        </div>
    </div>
</body>
</html>